﻿<?php
if (!defined('WEB_ROOT')) {
	exit;
}

// set the default page title
$pageTitle = 'CSDL Khoa học';

// if a product id is set add the product name
// to the page title but if the product id is not
// present check if a category id exist in the query string
// and add the category name to the page title
?>
<!DOCTYPE HTML PUBLIC
          "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="include/shop.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/default.css" rel="stylesheet" type="text/css">
<link href="css/index.css" rel="stylesheet" type="text/css">
<link href="library/plugin/JSCal2-1.9/src/css/jscal2.css" rel="stylesheet" type="text/css">
<link href="library/plugin/JSCal2-1.9/src/css/border-radius.css" rel="stylesheet" type="text/css">
<link href="css/overlay-apple.css" rel="stylesheet" type="text/css">
<link href="library/plugin/pagination/main.css" rel="stylesheet" type="text/css">
<!--link href="library/plugin/JSCal2-1.9/src/css/gold/gold.css" rel="stylesheet" type="text/css" -->

<script language="JavaScript" type="text/javascript" src="library/common.js"></script>
<script language="JavaScript" type="text/javascript" src="library/articles_functions.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js?ver=1.4.4"></script>
<!--script type="text/javascript" src="http://deluxethemes.com/comfy/wp-content/themes/comfy-3.1/js/jquery-ui-1.8.6.custom.min.js"></script-->
<!-- script type="text/javascript" src="http://deluxethemes.com/comfy/wp-content/themes/comfy-3.1/js/jquery.tools.min.js"></script --->
<script src="http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js"></script>
<script language="JavaScript" type="text/javascript" src="library/plugin/JSCal2-1.9/src/js/jscal2.js"></script>
<script language="JavaScript" type="text/javascript" src="library/plugin/JSCal2-1.9/src/js/lang/en.js"></script>
<!-- script language="JavaScript" type="text/javascript" src="library/plugin/pagination/pagination.js"></script -->
<script type="text/javascript">

// function that writes the list order to a cookie
// set the list selector
var setSelector = "ul.widgets";
// set the cookie name
var setCookieName = "listOrder";
// set the cookie expiry time (days):
var setCookieExpiry = 7;


$(function() {


// Layout options feature
$('a#options').click(function (){
	if (($('.layout_options')).is(':hidden')) {
	$('.layout_options').fadeIn('normal');
	} else {
	$('.layout_options').fadeOut('normal');
	}
});

$('.cancel a').click(function() {
	$('#wrapper').fadeTo('fast', 1.0);
	$('.layout_options').fadeOut('normal');
});

$('a#reset').click(function() {
$('.cat-widget').each( function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});
$('.box_a').each( function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});
$('.widgets li').each (function() {$.cookie($(this).attr('id'), null, { path: '/', expires: 100 }); $(this).show()});
$('.layout_options').fadeOut('normal');
$('#wrapper').fadeTo('fast', 1.0);
});
// done.

// Pages Drop Down
$("#topnav ul ul").css({display: "none"}); // Opera Fix
$("#topnav li").hover(function(){
if ($(this).parent().parent().attr("id") == 'topnav') {
$(this).removeClass('active-page');
$(this).addClass('active-page');
}
$(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(500);
},function(){
if ($(this).parent().parent().attr("id") == 'topnav') {
$(this).removeClass('active-page');
}
$(this).find('ul:first').css({visibility: "hidden"});
});
// End

// Categories Drop Down
$("#menu ul ul").css({display: "none"}); // Opera Fix
$("#menu li").hover(function(){
if ($(this).parent().parent().attr("id") == 'menu') {
$(this).removeClass('active-cat');
$(this).addClass('active-cat');
}
$(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(500);
},function(){
if ($(this).parent().parent().attr("id") == 'menu') {
$(this).removeClass('active-cat');
}
$(this).find('ul:first').css({visibility: "hidden"});
});
// End

/* various widget actions */
$('.minimize').click(function() {
	$(this).parent('h3').next('.container').toggle();
});

$('.Sminimize').click(function() {
	$(this).parent('h2').next().toggle();
});

$('.Wminimize').click(function() {
	$(this).parent('h2').next().toggle();
});






/* clear form */
$('.clearfield').each(function() {
    var default_value = this.value;
    $(this).css('color', '#666'); // this could be in the style sheet instead
    $(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
        }
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });
});

// video thumbs
$('.videothumb').bind('mouseenter', function() {$(this).children('.playit').children('a').show()});
$('.videothumb').bind('mouseleave', function() {$(this).children('.playit').children('a').hide()});

// more stories
$('ul.more_stories li').css({'display': 'none'});
$("ul.more_stories").each(function(){
$(this).children('li').slice(0, 3).show();
});

/* control visible stories */
$('.minus').click(function() {
$(this).parent().next('ul').children('li:visible:last').hide();
});

$('.plus').click(function() {
$(this).parent().next('ul').children('li:hidden:first').show();
});

// append top menu
$("#topnav ul:first").prepend('<li class="left"></li>');
$("#topnav ul:first").append('<li class="right"></li>');

// featured 1
$("span.overlay").fadeTo(1, 0.70);


});
</script>
<?php
$n = count($script);
for ($i = 0; $i < $n; $i++) {
	if ($script[$i] != '') {
		echo '<script language="JavaScript" type="text/javascript" src="library/' . $script[$i]. '"></script>';
	}
}
?>

</head>
<body>